home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4480 < prev    next >
Encoding:
Text File  |  1996-08-06  |  2.2 KB  |  132 lines

  1. Path: serv.HiNet.net!usenet
  2. From: Yu Tien-Te <casperyu@pc35.hinet.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: Help to debug my code?
  5. Date: Tue, 30 Jan 1996 22:27:16 +0800
  6. Organization: HiNet
  7. Message-ID: <310E2AC4.6726@pc35.hinet.net>
  8. NNTP-Posting-Host: 168.95.176.56
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b6a (Win95; I)
  13.  
  14. Error 35:'MyFrameWindow::Find(TEventHandler::TEventInfo &,int(*)
  15.          (TResponseTableEntry<GENERIC> &,TEventHandler::TEventInfo
  16.          &))' is not a member of 'MyFrameWindow'
  17. Error 35:'_entryies' is not a member of 'MyFrameWindow'
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. ---------------------------------------------
  26. #include <owl\applicat.h>
  27. #include <owl\framewin.h>
  28. //#include <owl\dc.h>
  29. //#include <owl\editfile.h>
  30. //#include <classlib\file.h>
  31. #include "myeditor.rh"
  32.  
  33.  
  34.  
  35. class MyFrameWindow : public TFrameWindow
  36. {
  37.     char    *FileName;
  38.  
  39.  
  40. public :
  41.     MyFrameWindow (TWindow *parent, const char far *title=0, TWindow 
  42. *clientWnd = 0,
  43.                         BOOL shrinkToClient = 
  44. FALSE, TModule *module = 0)
  45.                  : TFrameWindow(parent, title, 
  46. clientWnd, shrinkToClient, module)
  47.     {
  48.         FileName = NULL;
  49.     }
  50.  
  51.     
  52.     void  CmFileNew(void);
  53.     void  CmFileOpen(void);
  54.     void  CmFileSave(void);
  55.     void     CmFileSaveAs(void);
  56.     void    CmAbout(void);
  57.                  
  58.  
  59. DECLARE_RESPONE_TABLE(MyFrameWindow);
  60. };
  61.  
  62.                                     
  63.                   
  64. DEFINE_RESPONSE_TABLE1( MyFrameWindow, TFrameWindow ) //<<-HERE's ERROR
  65. EV_COMMAND(CM_FILENEW, CmFileNew),
  66. EV_COMMAND(CM_FILEOPEN, CmFileOpen),
  67. EV_COMMAND(CM_FILEAVE, CmFileSave),
  68. EV_COMMAND(CM_FILESAVEAS, CmFileSaveAs),
  69. EV_COMMAND(CM_ABOUT, CmAbout),
  70. END_RESPONSE_TABLE;
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. class HelloApp : public TApplication
  79. {
  80.           public :
  81.  
  82.           HelloApp ( )  : TApplication ()
  83.                  
  84.         {
  85.         }
  86.  
  87.           void InitMainWindow ( )
  88.           {
  89.                  TFrameWindow  *MyWin = new 
  90. MyFrameWindow ( NULL, "Editor" );
  91.                  SetMainWindow ( MyWin );
  92.                  MyWin->AssignMenu( MENU_1 );      
  93.           }
  94. };
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. void    MyFrameWindow::CmAbout(void)
  103. {
  104.     MessageBox("My Editor\n", "About");
  105. }
  106.  
  107. void    MyFrameWindow::CmFileNew(void)
  108. {
  109. }
  110.  
  111. void     MyFrameWindow::CmFileOpen(void)
  112. {
  113. }
  114.  
  115. void  MyFrameWindow::CmFileSave(void)
  116. {
  117. }
  118.  
  119. void  MyFrameWindow::CmFileSaveAs(void)
  120. {
  121. }
  122.  
  123.  
  124.  
  125.  
  126. int OwlMain ( int, char*[] )
  127. {
  128.           HelloApp MyProgram;
  129.  
  130.           return MyProgram.Run();
  131. }
  132.